<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <f:view contentType="text/html">
        <h:head>
            <f:facet name="first">
                <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
                <h:outputStylesheet library="css" name="customstyle.css"/>
                <title><h:outputText value="#{MyBundle.AppName}"></h:outputText></title>  
                <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript" />
            </f:facet>
        </h:head>

        <h:body>

            <p:growl id="growlIndex" sticky="true" />

            <p:layout fullPage="true">
                <p:layoutUnit position="north" size="90" resizable="true" closable="true" collapsible="true" >
                    <h1><h:outputText value="#{MyBundle.AppName}"></h:outputText></h1>
                </p:layoutUnit>  

                <p:layoutUnit position="west" size="300" header="#{MyBundle.Welcome}" collapsible="true">
                    <p:panel header="#{MyBundle.Login}">

                        <h:form id="loginForm">

                            <p:panelGrid columns="1">
                                <p:outputLabel for="user" value="#{MyBundle.User}"/>
                                <p:inputText id="user" value="#{login.user.user}"  required="true" requiredMessage="#{MyBundle.LoginUser_required}"/>
                                <p:outputLabel for="password" value="#{MyBundle.Pass}"/>
                                <p:password id="password" value="#{login.user.password}" required="true" requiredMessage="#{MyBundle.LoginPassword_required}"/>

                                <p:commandButton icon="ui-icon-arrowreturnthick-1-e" action="#{login.login}" value="Enviar" update=":growlIndex"/>

                            </p:panelGrid>
                        </h:form>
                    </p:panel>
                </p:layoutUnit>

                <p:layoutUnit position="center">
                    <p><h:outputText value="#{MyBundle.Error404}"></h:outputText></p>
                    <img src="resources/images/main.png"  alt="Servicio 112 - Imagen principal" id="andalucia"/>
                </p:layoutUnit>

                <p:layoutUnit id="footer" position="south" size="100" closable="true" collapsible="true">
                    <h:outputText value="#{MyBundle.Footer}"></h:outputText>
                </p:layoutUnit>
            </p:layout>

        </h:body>

    </f:view>
</html>